﻿using System.ComponentModel.DataAnnotations;

namespace Vue.Admin.Models
{
	/// <summary>
	/// 用户注册dto
	/// </summary>
	public class RegisterEmpDto
	{
		/// <summary>
		/// 姓名
		/// </summary>
		[Required(ErrorMessage = @"姓名不可为空")]
		[Display(Name ="姓名")]
		public string FName { get; set; }
		/// <summary>
		/// 用户名
		/// </summary>
		[Required(ErrorMessage = "用户名不可为空")]
		[Display(Name = "用户名")]
		public string FUserName { get; set; }
		/// <summary>
		/// 手机号
		/// </summary>
		[Required(ErrorMessage = @"手机号不可为空"), Phone(ErrorMessage = "手机号格式不正确")]
		[Display(Name = "手机号")]
		public string FPhone { get; set; }
		/// <summary>
		/// 邮箱
		/// </summary>
		[EmailAddress(ErrorMessage = "邮箱格式不正确"), Required(ErrorMessage = @"邮箱必填")]
		[Display(Name = "邮箱")]
		public string FEmail { get; set; }
		/// <summary>
		/// 密码
		/// </summary>
		[Required(ErrorMessage = "密码不可为空"), MinLength(6, ErrorMessage = @"密码最小为6位"), MaxLength(16, ErrorMessage = @"最大为16位")]
		[Display(Name = "密码")]
		public string FPwd { get; set; }
		/// <summary>
		/// 确认密码
		/// </summary>
		[Required(ErrorMessage = "确认密码不可为空"), MinLength(6, ErrorMessage = @"确认密码最小为6位"), MaxLength(16, ErrorMessage = @"确认密码为16位"),Compare("FPwd", ErrorMessage = @"密码必须一致")]
		[Display(Name = "确认密码")]
		public string FConfirmPwd { get; set; }
	}
}
